package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysUserWithdrawal2Mapper;
import com.ruoyi.project.system.domain.SysUserWithdrawal2;
import com.ruoyi.project.system.service.ISysUserWithdrawal2Service;

/**
 * 用户申请提现Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-23
 */
@Service
public class SysUserWithdrawal2ServiceImpl implements ISysUserWithdrawal2Service 
{
    @Autowired
    private SysUserWithdrawal2Mapper sysUserWithdrawal2Mapper;

    /**
     * 查询用户申请提现
     * 
     * @param withdrawalId 用户申请提现ID
     * @return 用户申请提现
     */
    @Override
    public SysUserWithdrawal2 selectSysUserWithdrawal2ById(Long withdrawalId)
    {
        return sysUserWithdrawal2Mapper.selectSysUserWithdrawal2ById(withdrawalId);
    }

    /**
     * 查询用户申请提现列表
     * 
     * @param sysUserWithdrawal2 用户申请提现
     * @return 用户申请提现
     */
    @Override
    public List<SysUserWithdrawal2> selectSysUserWithdrawal2List(SysUserWithdrawal2 sysUserWithdrawal2)
    {
        return sysUserWithdrawal2Mapper.selectSysUserWithdrawal2List(sysUserWithdrawal2);
    }

    /**
     * 新增用户申请提现
     * 
     * @param sysUserWithdrawal2 用户申请提现
     * @return 结果
     */
    @Override
    public int insertSysUserWithdrawal2(SysUserWithdrawal2 sysUserWithdrawal2)
    {
        sysUserWithdrawal2.setCreateTime(DateUtils.getNowDate());
        return sysUserWithdrawal2Mapper.insertSysUserWithdrawal2(sysUserWithdrawal2);
    }

    /**
     * 修改用户申请提现
     * 
     * @param sysUserWithdrawal2 用户申请提现
     * @return 结果
     */
    @Override
    public int updateSysUserWithdrawal2(SysUserWithdrawal2 sysUserWithdrawal2)
    {
        sysUserWithdrawal2.setUpdateTime(DateUtils.getNowDate());
        return sysUserWithdrawal2Mapper.updateSysUserWithdrawal2(sysUserWithdrawal2);
    }

    /**
     * 批量删除用户申请提现
     * 
     * @param withdrawalIds 需要删除的用户申请提现ID
     * @return 结果
     */
    @Override
    public int deleteSysUserWithdrawal2ByIds(Long[] withdrawalIds)
    {
        return sysUserWithdrawal2Mapper.deleteSysUserWithdrawal2ByIds(withdrawalIds);
    }

    /**
     * 删除用户申请提现信息
     * 
     * @param withdrawalId 用户申请提现ID
     * @return 结果
     */
    @Override
    public int deleteSysUserWithdrawal2ById(Long withdrawalId)
    {
        return sysUserWithdrawal2Mapper.deleteSysUserWithdrawal2ById(withdrawalId);
    }

    @Override
    public List<SysUserWithdrawal2> selectSysUserWithdrawal2ListMoney(Long mobileUserId) {
        return sysUserWithdrawal2Mapper.selectSysUserWithdrawal2ListMoney(mobileUserId);
    }
}
